package com.mo.design.pattern.creational.singleton;

public class NoLockSafeThreadSingleton {

    private static final NoLockSafeThreadSingleton instance = new NoLockSafeThreadSingleton();
    private NoLockSafeThreadSingleton(){
        System.out.println("Singleton is instantiated.");
    }

    public static synchronized NoLockSafeThreadSingleton getInstance() {
        return instance;
    }

    public void doSomeThing() {
        System.out.println("Something is Done.");
    }

    public static void main(String[] args) {
        getInstance().doSomeThing();
    }

}
